package com.pureut.production.api.factory;

import com.pureut.common.core.web.domain.AjaxResult;
import com.pureut.production.api.FeignProductionService;
import com.pureut.production.api.domain.FeedRecord;
import com.pureut.production.api.domain.LineStock;
import com.pureut.production.api.domain.PublicScheduling;
import com.pureut.production.api.domain.vo.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;

import java.util.List;


/**
 * @Description 生产降级服务
 * @Author hl
 **/
public class RemoteProductionFallbackFactory implements FallbackFactory<FeignProductionService> {

    private static final Logger log = LoggerFactory.getLogger(RemoteProductionFallbackFactory.class);


    @Override
    public FeignProductionService create(Throwable cause) {
        log.error("生产服务:{}", cause.getMessage());
        return new FeignProductionService(){

            @Override
            public int addOrderCutScheduling(PublicScheduling PublicScheduling) {
                return 0;
            }

            @Override
            public AjaxResult getWasteData(String materialNumber) {
                return null;
            }

            @Override
            public AjaxResult getLineStockData(String materialNumber) {
                return null;
            }

            @Override
            public AjaxResult getSpunlaceDetail(String materialNumber) {
                return null;
            }

            @Override
            public AjaxResult getWeighingFinishedData(String materialNumber) {
                return null;
            }

            @Override
            public boolean editQualityOrder(EditQualityOrderVo editQualityOrderVo) throws Exception {
                return false;
            }

            @Override
            public AjaxResult getLineStockList(LineStockVo lineStockVo) {
                return null;
            }

            @Override
            public AjaxResult updateLineStockStatus(UpdateLineStockStatusVo updateLineStockStatusVo) {
                return null;
            }

            @Override
            public AjaxResult detailList(String documentNum) {
                return null;
            }

            @Override
            public void updateStatusThaw(String materialNumber) {

            }

            @Override
            public AjaxResult getDetailList(String orderNum) {
                return null;
            }

            @Override
            public AjaxResult getProcessCardCoding(String wsiConnectNum) {
                return null;
            }

            @Override
            public AjaxResult selectMasterVolumeNumberList(String masterVolumeNumber) {
                return null;
            }

            @Override
            public AjaxResult getTraceabilityRollInfo(String materialNumber) {
                return null;
            }

            @Override
            public AjaxResult addLineStock(LineStock lineStock) {
                return null;
            }

            @Override
            public AjaxResult add(FeedRecord feedRecord) {
                return null;
            }

            @Override
            public AjaxResult addBatchLineStock(List<LineStock> list) {
                return null;
            }

            @Override
            public AjaxResult spunlaceUpdateStatus(UpdateProductionCheckVo updateProductionCheckVo) throws Exception {
                return null;
            }

            @Override
            public AjaxResult spunlaceUpdateGrade(UpdateProductionCheckVo updateProductionCheckVo) throws Exception {
                return null;
            }

            @Override
            public AjaxResult deleteLineStock(String materialNumber) {
                return null;
            }

            @Override
            public AjaxResult getCutOrdersDocumentInfo(String masterVolumeNumber) {
                return null;
            }

            @Override
            public AjaxResult getDataByGroupCode(String groupCode) {
                return null;
            }

            @Override
            public void upDateInTime(String wasteScrapNumber) {

            }

            @Override
            public void upDateOutTime(String wasteScrapNumber) {

            }

            @Override
            public AjaxResult updateByDegreasOutDetail(UpdateByDegreasOutDetailVo updateByDegreasOutDetailVo) {
                return null;
            }

            @Override
            public AjaxResult updateByDegreasOutDetailQuality(UpdateByDegreasOutDetailVo updateByDegreasOutDetailVo) {
                return null;
            }

            @Override
            public AjaxResult selectSpunlaceOrderInfo(String materialNumber) {
                return null;
            }

            @Override
            public AjaxResult selectDocumentStatusInfo(String feedOrderNumber) {
                return null;
            }

            @Override
            public AjaxResult selectDegreasDocumentInfo(String feedOrderNumber) {
                return null;
            }

            @Override
            public AjaxResult list(String masterVolumeNumber) {
                return null;
            }

            @Override
            public AjaxResult selectMaterialNumberInfo(String materialNumber) {
                return null;
            }

            @Override
            public boolean getStatusByPlanNumber(String planNumber) {
                return false;
            }

            @Override
            public AjaxResult getFinishedData(String materialNumber) {
                return null;
            }

            @Override
            public AjaxResult selectWeighingFinishedMaterialProductList(String masterVolumeNumber) {
                return null;
            }

            @Override
            public AjaxResult selectSpunlaceDetailList(String productionNumber) {
                return null;
            }

            @Override
            public AjaxResult selectRollPackingHistoryInfo(String smallVolumeNumber) {
                return null;
            }

            @Override
            public AjaxResult selectRollPackingHistoryMasterVolumeNumber(String masterVolumeNumber) {
                return null;
            }

            @Override
            public boolean remove(String planNumber) {
                return false;
            }

            @Override
            public AjaxResult getDegreasOrderDetailList(String degreasOrderNumber) {
                return null;
            }

            @Override
            public AjaxResult selectDetailListMaterialNumber(String materialNumber) {
                return null;
            }

            @Override
            public AjaxResult deleteBatchLineStock(String wareAlCode) {
                return null;
            }

            @Override
            public AjaxResult selectDetailLisMasterVolumeNumber(String masterVolumeNumber) {
                return null;
            }

            @Override
            public AjaxResult getMaterialNumberInfo(String materialNumber) {
                return null;
            }

            @Override
            public AjaxResult selectBySmallVolumeNumber(String smallVolumeNumber) {
                return null;
            }

            @Override
            public boolean getInfo(String moNumber) {
                return false;
            }
        };
    }
}
